package com.cfec.ipoth_service.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 多模态情绪综合评估表，整合各渠道分析结果得出综合判断
 * @TableName composite_mood_assessment
 */
@TableName(value ="composite_mood_assessment")
@Data
public class CompositeMoodAssessment {
    /**
     * 综合评估ID
     */
    @TableId(type = IdType.AUTO)
    private Long assessmentId;

    /**
     * 关联的老人ID
     */
    private Long olderId;

    /**
     * 评估时间
     */
    private Date assessmentTime;

    /**
     * 语音分析情绪结果
     */
    private String voiceEmotion;

    /**
     * 步态分析情绪结果
     */
    private String gaitEmotion;

    /**
     * 睡眠分析情绪结果
     */
    private String sleepEmotion;

    /**
     * 面部分析情绪结果
     */
    private String facialEmotion;

    /**
     * 综合情绪评分(0-100)
     */
    private BigDecimal compositeScore;

    /**
     * 情绪状态分类(normal/mild_distress/severe_distress/crisis)
     */
    private String moodStatus;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 1使用，0弃用
     */
    private Long assessmentStatus;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CompositeMoodAssessment other = (CompositeMoodAssessment) that;
        return (this.getAssessmentId() == null ? other.getAssessmentId() == null : this.getAssessmentId().equals(other.getAssessmentId()))
            && (this.getOlderId() == null ? other.getOlderId() == null : this.getOlderId().equals(other.getOlderId()))
            && (this.getAssessmentTime() == null ? other.getAssessmentTime() == null : this.getAssessmentTime().equals(other.getAssessmentTime()))
            && (this.getVoiceEmotion() == null ? other.getVoiceEmotion() == null : this.getVoiceEmotion().equals(other.getVoiceEmotion()))
            && (this.getGaitEmotion() == null ? other.getGaitEmotion() == null : this.getGaitEmotion().equals(other.getGaitEmotion()))
            && (this.getSleepEmotion() == null ? other.getSleepEmotion() == null : this.getSleepEmotion().equals(other.getSleepEmotion()))
            && (this.getFacialEmotion() == null ? other.getFacialEmotion() == null : this.getFacialEmotion().equals(other.getFacialEmotion()))
            && (this.getCompositeScore() == null ? other.getCompositeScore() == null : this.getCompositeScore().equals(other.getCompositeScore()))
            && (this.getMoodStatus() == null ? other.getMoodStatus() == null : this.getMoodStatus().equals(other.getMoodStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getAssessmentStatus() == null ? other.getAssessmentStatus() == null : this.getAssessmentStatus().equals(other.getAssessmentStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAssessmentId() == null) ? 0 : getAssessmentId().hashCode());
        result = prime * result + ((getOlderId() == null) ? 0 : getOlderId().hashCode());
        result = prime * result + ((getAssessmentTime() == null) ? 0 : getAssessmentTime().hashCode());
        result = prime * result + ((getVoiceEmotion() == null) ? 0 : getVoiceEmotion().hashCode());
        result = prime * result + ((getGaitEmotion() == null) ? 0 : getGaitEmotion().hashCode());
        result = prime * result + ((getSleepEmotion() == null) ? 0 : getSleepEmotion().hashCode());
        result = prime * result + ((getFacialEmotion() == null) ? 0 : getFacialEmotion().hashCode());
        result = prime * result + ((getCompositeScore() == null) ? 0 : getCompositeScore().hashCode());
        result = prime * result + ((getMoodStatus() == null) ? 0 : getMoodStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getAssessmentStatus() == null) ? 0 : getAssessmentStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", assessmentId=").append(assessmentId);
        sb.append(", olderId=").append(olderId);
        sb.append(", assessmentTime=").append(assessmentTime);
        sb.append(", voiceEmotion=").append(voiceEmotion);
        sb.append(", gaitEmotion=").append(gaitEmotion);
        sb.append(", sleepEmotion=").append(sleepEmotion);
        sb.append(", facialEmotion=").append(facialEmotion);
        sb.append(", compositeScore=").append(compositeScore);
        sb.append(", moodStatus=").append(moodStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", assessmentStatus=").append(assessmentStatus);
        sb.append("]");
        return sb.toString();
    }
}